﻿using System;
using System.Collections.Generic;
using System.Web;
using XinYiOffice.Common;

namespace XinYiOffice.Web.api
{
    /// <summary>
    /// authority 的摘要说明
    /// </summary>
    public class authority : IHttpHandler
    {

        string code = "0";
        string msg = string.Empty;
        string data = string.Empty;

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            //context.Response.Write("Hello World");

            string action = xytools.url_get("action");


            if (!string.IsNullOrEmpty(action))
            {
            }
            else
            {
                code = "-99";
            }


            RetrunString(context);
        }

        public void RetrunString(HttpContext context)
        {

            context.Response.Write("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":\"" + data + "\"}");

        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}